package com.albert.model;

import com.albert.tool.CameraActionType;

import lombok.Getter;
import lombok.Setter;

public class OperateCameraModel extends BaseModel {

    @Getter
    @Setter
    Boolean up;
    @Getter
    @Setter
    Boolean down;
    @Getter
    @Setter
    Boolean left;
    @Getter
    @Setter
    Boolean right;

    // 左旋 左移  右旋  右移
    public OperateCameraModel(CameraActionType carActionType, boolean isPressed) {
        switch (carActionType) {
            case CAMERA_ACTION_UP:
                this.up = isPressed;
                break;
            case CAMERA_ACTION_DOWN:
                this.down = isPressed;
                break;
            case CAMERA_ACTION_LEFT:
                this.left = isPressed;
                break;
            case CAMERA_ACTION_RIGHT:
                this.right = isPressed;
                break;
        }
    }
}
